package com.njtoyo.taxi.admin.rest.presenter.business.driver.system_message;

import com.alibaba.fastjson.JSON;
import com.njtoyo.taxi.admin.mapper.master.enums.DriverSystemMessageCategory;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

@Data
public class ListPresenter {

    @ApiModelProperty(value = "主键")
    private Long id;

    @ApiModelProperty(value = "内容")
    private String content;

    @ApiModelProperty(value = "规则")
    private Object rule;

    @ApiModelProperty(value = "类型")
    private DriverSystemMessageCategory category;

    @ApiModelProperty(value = "创建时间")
    private Date createdAt;

    @ApiModelProperty(value = "修改时间")
    private Date updatedAt;

    public void setRule(String rule) {
        this.rule = JSON.parse(rule);
    }
}
